﻿using System;
using System.Collections.Generic;
using System.Linq;
using ProgramDioptase.Interfaces;

namespace ProgramDioptase.ClientDescription
{
    class Client : Person, IRenter
    {
        public Client()
        {
        }

        public Client(string name, byte age, string address, string mobileNumber, string pictureSource, decimal ballanceOfAcount)
            : base(name, age, address, mobileNumber, pictureSource)
        {
            this.BallanceOfAcount = ballanceOfAcount;
        }

        public decimal BallanceOfAcount { get; private set; }

        public IList<IRentable> RentedItems { get; private set; }

        public IList<ISaleable> PurchasedItems { get; private set; }

        public void Rent(IRentable item)
        {
            this.RentedItems.Add(item);
        }

        public void Buy(ISaleable item)
        {
            this.PurchasedItems.Add(item);
        }
    }
}